<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<div th:include="includeJs::includeJs"></div>
	<div th:include="resources::myjk_2"></div>
	<div th:include="includeJs::layui_js"></div>
	<title>叮叮普惠</title>
</head>
<body>
	<div class="header">
		<div th:replace="includeJs::dingding_header"></div>
		<div class="clear"></div>
		<div th:replace="includeJs::dingding_nav">

		</div>
	</div>
	<div class="clear"></div>
	<div class="banner"></div>

	<div style=" width:100%; background:#f3f6f8">
		<div class="main">
			<!-- end banner -->
			<div class="bor_con_wper">
				<div class="bor_con px1000">
					<div class="bor_detail">
						<h2 class="bor_detail_tit">
							<span class="bor_decurspan" th:text="${deb.get(0).type}">XXX</span>
							<span th:text="${deb.get(1).type}">XXX</span>
							<span th:text="${deb.get(2).type}">XXX</span>
						</h2>
						<div class="bor_detail_box">
							<!-- end  信用贷 -->
							<div class="bor_det_one clearfix pt30 pb30">
								<div class="bor_det_onel fl	">
									<p class="bor_p1">叮叮借贷平台的借款功能旨在帮助借款用户以
										低成本获得借款。用户在需要资金时，可以将
										自有房产和车产作为抵押物，线下审核
										通过后，根据抵押物的价值融资。</p>
									<p class="bor_p2" style="font-size: 23px;">
										<span th:text="${deb.get(0).type}"></span>的利率为：
										<span th:text="${deb.get(0).yearInterset}+'%'" style="color:#ee4b4b;"></span>
									</p>
									<h3 class="bor_onel_tit"><span>申请条件</span></h3>
									<ul class="bor_onel_ul">
										<li>年满18周岁以上的公民
										</li>
										<li>需要叮叮信用分在五百以上
										</li>
										<li>个人或企业银行征信记录良好
										</li>
										<li>
											无现有诉讼记录
										</li>

									</ul>
									<h3 class="bor_onel_tit"><span>提交资料</span></h3>
									<ul class="bor_onel_ul">
										<li>身份证
										</li>
										<li>申请资料
										</li>
										<li>其他
										</li>
									</ul>
								</div>
								<!-- end l -->
								<div class="bor_det_oner fl">
									<form class="form-group form_container" method="post" action="/loan/affirmInfo" style="margin-left: 12%;">
										<fieldset>
											<div>
												<label>申请人</label>
												<input type="" disabled="disabled" required th:value="${user.realName}" AUTOCOMPLETE="off"/>
											</div>
											<div class="mt15">
												<label>*借款金额</label>
												<input type="text" class="bor_inputbg01" required name="lMoney" oninput="value=value.replace(/[^\d]/g,'')" maxlength="6"AUTOCOMPLETE="off">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*借款期限</label>
												<select name="lMonth" lay-verify="required" required style="text-align:center;text-align-last:center;padding-left:6px; margin:-0.6rem 0;" >
													<option value="6">6个月</option>
													<option value="12">12个月</option>
													<option value="18">18个月</option>
													<option value="24">24个月</option>
													<option value="36">36个月</option>
												</select>
											</div>
											<div class="mt15">
												<label>*手机号码</label>
												<input type="" name="lPhone" required AUTOCOMPLETE="off" onkeyup="value=value.replace(/[^\d]/g,'')">
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">所在公司</label>
												<div class="fl">
													<span>公司名称</span>
													<input type="text" name="company" class="bor_inputbg03 input2" AUTOCOMPLETE="off"><br><br>
													<span>公司电话</span>
													<input type="text" name="companyPhone" class="bor_inputbg04 input2" AUTOCOMPLETE="off"><br>
												</div>
											</div>
											<div class="mt15">
												<label>*月收入</label>
												<input type="" name="monthlyProfit" AUTOCOMPLETE="off" required class="bor_inputbg01"  oninput="value=value.replace(/[^\d]/g,'')" maxlength="8">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*所在地区</label>
												<div class="wrap" style="display:inline-block;">
													<input class="input city address" required name="address"  type="text" placeholder="请选择" autocomplete="off" readonly="true"><s></s>
												</div>
											</div>
											<div class="mt15">
												<label>*详细地址</label>
												<input type="" name="street" AUTOCOMPLETE="off" required class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款用途</label>
												<input type="" name="purposeOfLoan" AUTOCOMPLETE="off" required class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款描述</label>
												<textarea name="commentOfLoan" AUTOCOMPLETE="off" required></textarea>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人1</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人2</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="sub_btn" style="text-align: center;padding: 4%;" >
												<input type="hidden"  th:value="${T(com.ddf.publics.tool.Constant).LOAN_TYPE_XINYONG}" name="loanType">
												<button type="submit" th:if="${flag=='0'}" class="layui-btn layui-btn-normal">提交材料</button>
												<button type="button" th:if="${flag=='1'}" class="layui-btn layui-btn-disabled">已有贷款</button>
											</div>
										</fieldset>
									</form>
								</div>
							</div>
							<!-- end  抵押贷-->
							<div class="bor_det_one clearfix pt30 pb30" style="display:none;">
								<div class="bor_det_onel fl	">
									<p class="bor_p1">叮叮借贷平台的借款功能旨在帮助借款用户以
										低成本获得借款。用户在需要资金时，可以将
										自有房产和车产作为抵押物，线下审核
										通过后，根据抵押物的价值融资。</p>
									<p class="bor_p2" style="font-size: 23px;">
										<span th:text="${deb.get(1).type}"></span>的利率为：
										<span th:text="${deb.get(1).yearInterset}+'%'" style="color:#ee4b4b;"></span>
									</p>
									<h3 class="bor_onel_tit"><span>申请条件</span></h3>
									<ul class="bor_onel_ul">
										<li>年满18周岁以上的公民
										</li>
										<li>需要房产或车产抵押
										</li>
										<li>个人或企业银行征信记录良好
										</li>
										<li>
											无现有诉讼记录
										</li>

									</ul>
									<h3 class="bor_onel_tit"><span>提交资料</span></h3>
									<ul class="bor_onel_ul">
										<li>身份证
										</li>
										<li>申请资料
										</li>
										<li>抵押物品证明</li>
										<li>其他
										</li>
									</ul>
								</div>
								<!-- end l -->
								<div class="bor_det_oner fl">
									<form class="form-group form_container" id="diya" method="post"  action="/loan/addMortgage" enctype="multipart/form-data" style="margin-left: 12%;">
										<fieldset>
											<div>
												<label>申请人</label>
												<input type="" disabled="disabled" th:value="${user.realName}" />
											</div>
											<div class="mt15">
												<label>*借款金额</label>
												<input type="text" class="bor_inputbg01" required AUTOCOMPLETE="off" name="lMoney" oninput="value=value.replace(/[^\d]/g,'')" maxlength="6">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*借款期限</label>
												<select name="lMonth" lay-verify="required" required style="text-align:center;text-align-last:center;padding-left:6px; margin:-0.6rem 0;" >
													<option value="6">6个月</option>
													<option value="12">12个月</option>
													<option value="18">18个月</option>
													<option value="24">24个月</option>
													<option value="36">36个月</option>
												</select>
											</div>
											<div class="mt15">
												<label>*手机号码</label>
												<input type="" AUTOCOMPLETE="off" name="lPhone" required onkeyup="value=value.replace(/[^\d]/g,'')">
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">所在公司</label>
												<div class="fl">
													<span>公司名称</span>
													<input type="text" AUTOCOMPLETE="off" required name="company" class="bor_inputbg03 input2"><br><br>
													<span>公司电话</span>
													<input type="text" AUTOCOMPLETE="off" required name="companyPhone" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="mt15">
												<label>*月收入</label>
												<input type="" name="monthlyProfit" required AUTOCOMPLETE="off" class="bor_inputbg01"  oninput="value=value.replace(/[^\d]/g,'')" maxlength="8">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*抵押方式</label>
												<select name="name" lay-verify="required" required style="text-align:center;text-align-last:center;padding-left:6px; margin:-0.6rem 0;">
													<option value="房屋抵押">房屋抵押</option>
													<option value="车辆抵押">车辆抵押</option>
												</select>
											</div>
											<div class="mt15" style="display: inline-block;">
												<label>*证书</label>
<!--												<input type="file" name="files" accept="image/*" onchange="changImg(event)" >-->
												<a href="javascript:;" class="file">选择证书图片
													<input type="file" onchange="changImg(event)"  accept="image/*" name="files" id="files"/>
												</a>
												<div>

												</div>
											</div>
											<img id="image" src="\loanimg\zhengshu\zhengshu.png" height="100px",width="100px" style="margin-bottom: -5%;">
											<div class="mt15">
												<label>*所在地区</label>
												<div class="wrap" style="display:inline-block;">
													<input class="input city address" name="address"  type="text" placeholder="请选择" autocomplete="off" readonly="true"><s></s>
												</div>
											</div>
											<div class="mt15">
												<label>*详细地址</label>
												<input type="" name="street" required AUTOCOMPLETE="off" class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款用途</label>
												<input type="" name="purposeOfLoan" required AUTOCOMPLETE="off" class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款描述</label>
												<textarea name="commentOfLoan" required AUTOCOMPLETE="off"></textarea>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人1</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人2</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="sub_btn" style="text-align: center;padding: 4%;" >
												<input type="hidden"  th:value="${T(com.ddf.publics.tool.Constant).LOAN_TYPE_DIYA}" name="loanType">
												<button type="button" th:if="${flag=='0'}" class="layui-btn layui-btn-normal" onclick="submitXML()">提交材料</button>
												<button type="button" th:if="${flag=='1'}" class="layui-btn layui-btn-disabled">已有贷款</button>
											</div>
										</fieldset>
									</form>
								</div>
							</div>
							<!-- end  微妙贷-->
							<div class="bor_det_one clearfix pt30 pb30" style="display:none;">
								<div class="bor_det_onel fl	">
									<p class="bor_p1">叮叮借贷平台的借款功能旨在帮助借款用户以
										低成本获得借款。用户在需要资金时，可以将
										第三方的信用证明，线下审核
										通过后，根据信用度进行融资。</p>
									<p class="bor_p2" style="font-size: 23px;">
										<span th:text="${deb.get(2).type}"></span>的利率为：
										<span th:text="${deb.get(2).yearInterset}+'%'" style="color:#ee4b4b;"></span>
									</p>
									<h3 class="bor_onel_tit"><span>申请条件</span></h3>
									<ul class="bor_onel_ul">
										<li>年满18周岁以上的公民
										</li>
										<li>需要第三方证明
										</li>
										<li>个人或企业银行征信记录良好
										</li>
										<li>
											无现有诉讼记录
										</li>
									</ul>
									<h3 class="bor_onel_tit"><span>提交资料</span></h3>
									<ul class="bor_onel_ul">
										<li>身份证
										</li>
										<li>申请资料
										</li>
										<li>其他
										</li>
									</ul>
								</div>
								<!-- end l -->
								<div class="bor_det_oner fl">
									<form class="form-group form_container" id="wmd_form" method="post"  action="/loan/addMortgage" enctype="multipart/form-data" style="margin-left: 12%;">
										<fieldset>
											<div>
												<label>申请人</label>
												<input type="" disabled="disabled" th:value="${user.realName}" />
											</div>
											<div class="mt15">
												<label>*借款金额</label>
												<input type="text" class="bor_inputbg01" required AUTOCOMPLETE="off" name="lMoney" oninput="value=value.replace(/[^\d]/g,'')" maxlength="6">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*借款期限</label>
												<select name="lMonth" lay-verify="required" required style="text-align:center;text-align-last:center;padding-left:6px; margin:-0.6rem 0;" >
													<option value="6">6个月</option>
													<option value="12">12个月</option>
													<option value="18">18个月</option>
													<option value="24">24个月</option>
													<option value="36">36个月</option>
												</select>
											</div>
											<div class="mt15">
												<label>*手机号码</label>
												<input name="lPhone"  AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')">
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">所在公司</label>
												<div class="fl">
													<span>公司名称</span>
													<input type="text" name="company" required AUTOCOMPLETE="off" class="bor_inputbg03 input2"><br><br>
													<span>公司电话</span>
													<input type="text" name="companyPhone" required AUTOCOMPLETE="off" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="mt15">
												<label>*月收入</label>
												<input type="" name="monthlyProfit" required class="bor_inputbg01"  AUTOCOMPLETE="off" oninput="value=value.replace(/[^\d]/g,'')" maxlength="8">
												<span style="font-size: 21px;">元</span>
											</div>
											<div class="mt15">
												<label>*第三方</label>
												<select name="name" lay-verify="required" required style="text-align:center;text-align-last:center;padding-left:6px; margin:-0.6rem 0;">
													<option value="支付宝芝麻信用分">支付宝芝麻信用分</option>
													<option value="微信支付分">微信支付分</option>
												</select>
											</div>
											<div class="mt15" style="display: inline-block;">
												<label>*信用证明</label>
												<a href="javascript:;" class="file">信用分证明图片
													<input type="file" accept="image/*" name="scoreImg" id="scoreImg">
												</a>
											</div>
											<img id="scoreImage" src="\loanimg\zhengshu\xinyong.png" height="100px",width="100px" style="margin-bottom: -5%;">
											<div class="mt15">
												<label>*所在地区</label>
												<div class="wrap" style="display:inline-block;">
													<input class="input city address" required  name="address"  type="text" placeholder="请选择" autocomplete="off" readonly="true"><s></s>
												</div>
											</div>
											<div class="mt15">
												<label>*详细地址</label>
												<input type="" name="street" required AUTOCOMPLETE="off" class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款用途</label>
												<input type="" name="purposeOfLoan" required AUTOCOMPLETE="off" class="bor_inputbg01">
											</div>
											<div class="mt15">
												<label>*借款描述</label>
												<textarea name="commentOfLoan" required AUTOCOMPLETE="off"></textarea>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人1</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
												</div>
											</div>
											<div class="mt15 guarmethod clearfix">
												<label class="guarmethod_l fl">*紧急联系人2</label>
												<div class="fl">
													<span>姓名</span>
													<input type="text" name="clan_name" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>关系</span>
													<input type="text" name="clan_relation" AUTOCOMPLETE="off" required class="bor_inputbg04 input2"><br>
													<span>号码</span>
													<input type="text" name="clan_phone" AUTOCOMPLETE="off" required onkeyup="value=value.replace(/[^\d]/g,'')" class="bor_inputbg04 input2"><br>
													<input type="hidden" id="flag" th:value="${flag}">
												</div>
											</div>
											<div class="sub_btn" style="text-align: center;padding: 4%;" >
												<input type="hidden"  th:value="${T(com.ddf.publics.tool.Constant).LOAN_TYPE_WEILI}" name="loanType">
												<button type="submit" th:if="${flag=='0'}" class="layui-btn layui-btn-normal" onclick="submitXML2()">提交材料</button>
												<button type="button" th:if="${flag=='1'}" class="layui-btn layui-btn-disabled">已有贷款</button>
											</div>
										</fieldset>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="clear"></div>
	<div class="footer" style=" margin-top:40px">
	   <div class="footer_m">
		   <div class="footer_l">使用条款 | 隐私保护</div>
		   <div class="footer_r">© 2015 （杭州）金融信息服务有限公司    杭ICP备0000000号</div>
	   </div>
	</div>
</body>
<script type="text/javascript">
	$(".city").click(function (e) {
		SelCity(this,e);
	});
	$("s").click(function (e) {
		SelCity(document.getElementById("city"),e);
	});

	function submitXML(){
		var fileInput = $('#files').get(0).files[0];
		// console.info(fileInput);
		if(fileInput){
			$("#diya").submit();
		}else{
			layer.alert("请选择上传文件！");
		}
	}
	function submitXML2(){
		var fileInput = $('#scoreImg').get(0).files[0];
		// console.info(fileInput);
		if(fileInput){
			$("#wmd_form").submit();
		}else{
			layer.alert("请选择上传文件！");
		}
	}
</script>
　<script>
	// 抵押贷图片回显
	function changImg(e){
		for (var i = 0; i < e.target.files.length; i++) {
			var file = e.target.files.item(i);
			//验证是否为图片，不是就跳出循环
			if (!(/^image\/.*$/i.test(file.type))) {
				alert("不是图片！")
				continue;
			}
			//实例化FileReader API
			var freader = new FileReader();
			freader.readAsDataURL(file);
			freader.onload = function(e) {
				$("#image").attr("src",e.target.result);  //显示图片
			}
		}
	}

//微妙贷图片回显
	$(function () {
	$("#scoreImage").click(function () {
	$("#scoreImg").click();
	})

	$("#scoreImg").change(function (e) {
	imgPreview(this,e,$(this));
	})

	});

	function imgPreview(fileDom,e,ele) {
		//获取文件
		var file = fileDom.files[0];
		var supportedTypes = ['image/jpg', 'image/jpeg', 'image/png'];
		if (!(supportedTypes.indexOf(file.type) > -1)) {
			alert('请选择.jpg、.jpeg,.png格式图片')
			return;
		}
		var uploadFiles = e.target.files || e.dataTransfer.files;
		var size = uploadFiles.length;
		for (var i = 0; i < size; i++) {
			/*读取文件*/
			var reader = new FileReader();
			reader.readAsDataURL(uploadFiles[i]);
			reader.onload = function (e) {
				var imgBase = e.target.result;
				$("#scoreImage").attr("src",imgBase);  //显示图片
				// ele.siblings('img').attr('src', imgBase).show()
			}
		}
	}
	$(document).ready(function () {
		let ff = $("#flag").val();
		if(ff=='1') {
			//询问框
			layer.confirm('你已经有借款，请还清上次借款后再次借款。', {
				btn: ['确定'] //按钮
			}, function () {
				layer.msg('感谢支持！', {icon: 6});
			})
		}
	})
</script>
</html>
